//
//  UIImage+ABResize.m
//  AddressBook
//
//  Created by JiaHao on 7/10/15.
//  Copyright (c) 2015 whalefin. All rights reserved.
//

#import "UIImage+ABResize.h"


@implementation UIImage (ABResize)

+ (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size {
    UIGraphicsBeginImageContext(size);
    size.height +=1;
    [img drawInRect:CGRectMake(0, 0, size.width, size.height)];
    UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return scaledImage;
}

@end
